﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SudokuModel;

/*
 * "Sudoku." Puzzles Home Page. Merschat.com, n.d. 
 * Web. 28 Nov. 2014. <http://sudoku-puzzles.merschat.com/>.
 * 
 * The 16x16 puzzles were found with answers from this website as the random generator was not able to
 * be made to work for our program. There was no author not copyright date on the webpage to be able to
 * cite this information. Finding the exact puzzles that we used maybe impossible, but the images that 
 * we took from them will be uploaded in the project folder as well for referance.
 */


namespace CSE360_SudokuProject
{
    public static class ThePuzzleGenerator
    {
        //variables
       
        //boar variables
        //one board type must be null
        public static byte[,] BoardAnswer9x9 = null;
        public static byte[,] BoardInitial9x9 = null;
        public static byte[,] BoardCurrent9x9 = null;
        public static byte[,] BoardAnswer16x16 = null;
        public static byte[,] BoardInitial16x16 = null;
        public static byte[,] BoardCurrent16x16 = null;
        //variable for the generator
        private static Sudoku generator = new Sudoku();
        //bools for which board it is
        public static bool is9x9 = false;
        public static bool is16x16 = false;
        //random variables to select the 16x16puzzle
        static Random rand = new Random();
        static int therandom = 0;

        static ThePuzzleGenerator()
        {
            //initializes the sudoku puzzle generator to zeros
            ResetPuzzle();
        }

        private static void ResetPuzzle()
        {
            //resets the sudoku generator to all zeros
            byte[,] d = new byte[9,9];
			for(int i = 0; i < 9; i++)
				for(int j = 0; j < 9; j++)
					d[i,j] = 0;
            generator.Data = d;
        }

        public static void EasyBoard()
        {
            //Only one board (and type) can be saved at a time so elimintate the other board
            ThePuzzleGenerator.BoardAnswer16x16 = null;
            ThePuzzleGenerator.BoardCurrent16x16 = null;
            ThePuzzleGenerator.BoardInitial16x16 = null;

            //resets the generator to all zeros
            ResetPuzzle();
            //generates the sudoku puzzle and then places it as current and initial data
            generator.Generate(35);
            BoardInitial9x9 = generator.Data;
            BoardCurrent9x9 = generator.Data;
            //solves the sudoku puzzle for use of checking against current board and stores the info in the answer board
            generator.Solve();
            BoardAnswer9x9 = generator.Data;
        }

        public static void MediumBoard()
        {
            //Only one board (and type) an be saved at a time so elimintate the other board
            ThePuzzleGenerator.BoardAnswer16x16 = null;
            ThePuzzleGenerator.BoardCurrent16x16 = null;
            ThePuzzleGenerator.BoardInitial16x16 = null;

            //resets the generator to all zeros
            ResetPuzzle();
            //generates the sudoku puzzle and then places it as current and initial data
            generator.Generate(30);
            BoardInitial9x9 = generator.Data;
            BoardCurrent9x9 = generator.Data;
            //solves the sudoku puzzle for use of checking against current board and stores the info in the answer board
            generator.Solve();
            BoardAnswer9x9 = generator.Data;
        }

        public static void HardBoard()
        {
            //Only one board (and type) an be saved at a time so elimintate the other board
            ThePuzzleGenerator.BoardAnswer16x16 = null;
            ThePuzzleGenerator.BoardCurrent16x16 = null;
            ThePuzzleGenerator.BoardInitial16x16 = null;

            //resets the generator to all zeros
            ResetPuzzle();
            //generates the sudoku puzzle and then places it as current and initial data
            generator.Generate(25);
            BoardInitial9x9 = generator.Data;
            BoardCurrent9x9 = generator.Data;
            //solves the sudoku puzzle for use of checking against current board and stores the info in the answer board
            generator.Solve();
            BoardAnswer9x9 = generator.Data;
        }

        public static void HellBoard()
        {
            //Only one board (and type) an be saved at a time so elimintate the other board
            BoardAnswer9x9 = null;
            BoardCurrent9x9 = null;
            BoardInitial9x9 = null;

            //initializes the 16x16 board
            BoardAnswer16x16 = new byte[16, 16];
            BoardCurrent16x16 = new byte[16, 16];
            BoardInitial16x16 = new byte[16, 16];
            //loops through and places zeros at each spot
            for(int i = 0; i<16; i++)
                for(int j = 0; j<16; j++)
                {
                    BoardCurrent16x16[i, j] = 0;
                    BoardInitial16x16[i, j] = 0;
                    BoardAnswer16x16[i, j] = 0;
                }
            //rand chooses which board to use
            therandom = rand.Next(3);
            if (therandom == 0)
            {
                //writes over the initial board to fill in the correct spots
                #region initial
                BoardInitial16x16[0, 0] = 2;
                BoardInitial16x16[0, 1] = 3;
                BoardInitial16x16[0, 3] = 6;
                BoardInitial16x16[3, 1] = 14;
                BoardInitial16x16[3, 2] = 16;

                BoardInitial16x16[1, 5] = 3;
                BoardInitial16x16[1, 6] = 15;
                BoardInitial16x16[2, 5] = 13;

                BoardInitial16x16[0, 8] = 7;
                BoardInitial16x16[0, 10] = 5;
                BoardInitial16x16[2, 8] = 2;
                BoardInitial16x16[2, 9] = 3;
                BoardInitial16x16[2, 11] = 6;
                BoardInitial16x16[3, 10] = 12;

                BoardInitial16x16[0, 12] = 13;
                BoardInitial16x16[2, 12] = 14;
                BoardInitial16x16[2, 15] = 4;

                BoardInitial16x16[4, 0] = 6;
                BoardInitial16x16[4, 1] = 2;
                BoardInitial16x16[5, 0] = 10;
                BoardInitial16x16[5, 3] = 12;
                BoardInitial16x16[6, 1] = 1;
                BoardInitial16x16[7, 2] = 14;
                BoardInitial16x16[7, 3] = 16;

                BoardInitial16x16[4, 4] = 4;
                BoardInitial16x16[4, 5] = 14;
                BoardInitial16x16[5, 6] = 3;
                BoardInitial16x16[6, 5] = 9;

                BoardInitial16x16[4, 9] = 7;
                BoardInitial16x16[4, 11] = 5;
                BoardInitial16x16[5, 9] = 14;
                BoardInitial16x16[5, 11] = 8;
                BoardInitial16x16[6, 9] = 2;
                BoardInitial16x16[6, 11] = 15;

                BoardInitial16x16[4, 13] = 13;
                BoardInitial16x16[4, 15] = 10;
                BoardInitial16x16[5, 14] = 11;
                BoardInitial16x16[6, 12] = 4;
                BoardInitial16x16[6, 15] = 8;
                BoardInitial16x16[7, 14] = 3;
                BoardInitial16x16[7, 15] = 15;

                BoardInitial16x16[8, 2] = 2;
                BoardInitial16x16[9, 2] = 9;
                BoardInitial16x16[10, 3] = 7;
                BoardInitial16x16[11, 1] = 8;

                BoardInitial16x16[8, 4] = 8;
                BoardInitial16x16[8, 5] = 4;
                BoardInitial16x16[9, 4] = 15;
                BoardInitial16x16[11, 5] = 5;
                BoardInitial16x16[11, 6] = 1;
                BoardInitial16x16[11, 7] = 7;

                BoardInitial16x16[8, 8] = 5;
                BoardInitial16x16[10, 9] = 6;
                BoardInitial16x16[10, 11] = 3;
                BoardInitial16x16[11, 8] = 12;
                BoardInitial16x16[11, 11] = 13;

                BoardInitial16x16[9, 13] = 1;
                BoardInitial16x16[10, 15] = 16;
                BoardInitial16x16[11, 13] = 6;
                BoardInitial16x16[11, 14] = 2;

                BoardInitial16x16[12, 2] = 6;
                BoardInitial16x16[14, 0] = 7;
                BoardInitial16x16[14, 3] = 1;
                BoardInitial16x16[15, 0] = 14;

                BoardInitial16x16[12, 7] = 14;
                BoardInitial16x16[13, 5] = 15;
                BoardInitial16x16[13, 7] = 2;
                BoardInitial16x16[14, 5] = 12;
                BoardInitial16x16[14, 6] = 10;
                BoardInitial16x16[15, 4] = 7;
                BoardInitial16x16[15, 5] = 11;
                BoardInitial16x16[15, 6] = 5;

                BoardInitial16x16[12, 9] = 5;
                BoardInitial16x16[14, 9] = 15;
                BoardInitial16x16[15, 10] = 10;
                BoardInitial16x16[15, 11] = 9;

                BoardInitial16x16[12, 13] = 10;
                BoardInitial16x16[14, 14] = 4;
                BoardInitial16x16[14, 15] = 14;
                BoardInitial16x16[15, 14] = 6;
                BoardInitial16x16[15, 15] = 2;
                #endregion

                //writes over the current board to fill in the correct spots
                #region current
                BoardCurrent16x16[0, 0] = 2;
                BoardCurrent16x16[0, 1] = 3;
                BoardCurrent16x16[0, 3] = 6;
                BoardCurrent16x16[3, 1] = 14;
                BoardCurrent16x16[3, 2] = 16;

                BoardCurrent16x16[1, 5] = 3;
                BoardCurrent16x16[1, 6] = 15;
                BoardCurrent16x16[2, 5] = 13;

                BoardCurrent16x16[0, 8] = 7;
                BoardCurrent16x16[0, 10] = 5;
                BoardCurrent16x16[2, 8] = 2;
                BoardCurrent16x16[2, 9] = 3;
                BoardCurrent16x16[2, 11] = 6;
                BoardCurrent16x16[3, 10] = 12;

                BoardCurrent16x16[0, 12] = 13;
                BoardCurrent16x16[2, 12] = 14;
                BoardCurrent16x16[2, 15] = 4;

                BoardCurrent16x16[4, 0] = 6;
                BoardCurrent16x16[4, 1] = 2;
                BoardCurrent16x16[5, 0] = 10;
                BoardCurrent16x16[5, 3] = 12;
                BoardCurrent16x16[6, 1] = 1;
                BoardCurrent16x16[7, 2] = 14;
                BoardCurrent16x16[7, 3] = 16;

                BoardCurrent16x16[4, 4] = 4;
                BoardCurrent16x16[4, 5] = 14;
                BoardCurrent16x16[5, 6] = 3;
                BoardCurrent16x16[6, 5] = 9;

                BoardCurrent16x16[4, 9] = 7;
                BoardCurrent16x16[4, 11] = 5;
                BoardCurrent16x16[5, 9] = 14;
                BoardCurrent16x16[5, 11] = 8;
                BoardCurrent16x16[6, 9] = 2;
                BoardCurrent16x16[6, 11] = 15;

                BoardCurrent16x16[4, 13] = 13;
                BoardCurrent16x16[4, 15] = 10;
                BoardCurrent16x16[5, 14] = 11;
                BoardCurrent16x16[6, 12] = 4;
                BoardCurrent16x16[6, 15] = 8;
                BoardCurrent16x16[7, 14] = 3;
                BoardCurrent16x16[7, 15] = 15;

                BoardCurrent16x16[8, 2] = 2;
                BoardCurrent16x16[9, 2] = 9;
                BoardCurrent16x16[10, 3] = 7;
                BoardCurrent16x16[11, 1] = 8;

                BoardCurrent16x16[8, 4] = 8;
                BoardCurrent16x16[8, 5] = 4;
                BoardCurrent16x16[9, 4] = 15;
                BoardCurrent16x16[11, 5] = 5;
                BoardCurrent16x16[11, 6] = 1;
                BoardCurrent16x16[11, 7] = 7;

                BoardCurrent16x16[8, 8] = 5;
                BoardCurrent16x16[10, 9] = 6;
                BoardCurrent16x16[10, 11] = 3;
                BoardCurrent16x16[11, 8] = 12;
                BoardCurrent16x16[11, 11] = 13;

                BoardCurrent16x16[9, 13] = 1;
                BoardCurrent16x16[10, 15] = 16;
                BoardCurrent16x16[11, 13] = 6;
                BoardCurrent16x16[11, 14] = 2;

                BoardCurrent16x16[12, 2] = 6;
                BoardCurrent16x16[14, 0] = 7;
                BoardCurrent16x16[14, 3] = 1;
                BoardCurrent16x16[15, 0] = 14;

                BoardCurrent16x16[12, 7] = 14;
                BoardCurrent16x16[13, 5] = 15;
                BoardCurrent16x16[13, 7] = 2;
                BoardCurrent16x16[14, 5] = 12;
                BoardCurrent16x16[14, 6] = 10;
                BoardCurrent16x16[15, 4] = 7;
                BoardCurrent16x16[15, 5] = 11;
                BoardCurrent16x16[15, 6] = 5;

                BoardCurrent16x16[12, 9] = 5;
                BoardCurrent16x16[14, 9] = 15;
                BoardCurrent16x16[15, 10] = 10;
                BoardCurrent16x16[15, 11] = 9;

                BoardCurrent16x16[12, 13] = 10;
                BoardCurrent16x16[14, 14] = 4;
                BoardCurrent16x16[14, 15] = 14;
                BoardCurrent16x16[15, 14] = 6;
                BoardCurrent16x16[15, 15] = 2;
                #endregion

                //writes over the answer board to fill in the correct spots
                #region answerboard
                BoardAnswer16x16[0, 0] = 2;
                BoardAnswer16x16[0, 1] = 3;
                BoardAnswer16x16[0, 2] = 15;
                BoardAnswer16x16[0, 3] = 6;
                BoardAnswer16x16[1, 0] = 9;
                BoardAnswer16x16[1, 1] = 13;
                BoardAnswer16x16[1, 2] = 12;
                BoardAnswer16x16[1, 3] = 10;
                BoardAnswer16x16[2, 0] = 1;
                BoardAnswer16x16[2, 1] = 7;
                BoardAnswer16x16[2, 2] = 11;
                BoardAnswer16x16[2, 3] = 5;
                BoardAnswer16x16[3, 0] = 4;
                BoardAnswer16x16[3, 1] = 14;
                BoardAnswer16x16[3, 2] = 16;
                BoardAnswer16x16[3, 3] = 8;

                BoardAnswer16x16[0, 4] = 14;
                BoardAnswer16x16[0, 5] = 16;
                BoardAnswer16x16[0, 6] = 8;
                BoardAnswer16x16[0, 7] = 4;
                BoardAnswer16x16[1, 4] = 2;
                BoardAnswer16x16[1, 5] = 3;
                BoardAnswer16x16[1, 6] = 15;
                BoardAnswer16x16[1, 7] = 6;
                BoardAnswer16x16[2, 4] = 9;
                BoardAnswer16x16[2, 5] = 13;
                BoardAnswer16x16[2, 6] = 12;
                BoardAnswer16x16[2, 7] = 10;
                BoardAnswer16x16[3, 4] = 1;
                BoardAnswer16x16[3, 5] = 7;
                BoardAnswer16x16[3, 6] = 11;
                BoardAnswer16x16[3, 7] = 5;

                BoardAnswer16x16[0, 8] = 7;
                BoardAnswer16x16[0, 9] = 11;
                BoardAnswer16x16[0, 10] = 5;
                BoardAnswer16x16[0, 11] = 1;
                BoardAnswer16x16[1, 8] = 14;
                BoardAnswer16x16[1, 9] = 16;
                BoardAnswer16x16[1, 10] = 8;
                BoardAnswer16x16[1, 11] = 4;
                BoardAnswer16x16[2, 8] = 2;
                BoardAnswer16x16[2, 9] = 3;
                BoardAnswer16x16[2, 10] = 15;
                BoardAnswer16x16[2, 11] = 6;
                BoardAnswer16x16[3, 8] = 9;
                BoardAnswer16x16[3, 9] = 13;
                BoardAnswer16x16[3, 10] = 12;
                BoardAnswer16x16[3, 11] = 10;

                BoardAnswer16x16[0, 12] = 13;
                BoardAnswer16x16[0, 13] = 12;
                BoardAnswer16x16[0, 14] = 10;
                BoardAnswer16x16[0, 15] = 9;
                BoardAnswer16x16[1, 12] = 7;
                BoardAnswer16x16[1, 13] = 11;
                BoardAnswer16x16[1, 14] = 5;
                BoardAnswer16x16[1, 15] = 1;
                BoardAnswer16x16[2, 12] = 14;
                BoardAnswer16x16[2, 13] = 16;
                BoardAnswer16x16[2, 14] = 8;
                BoardAnswer16x16[2, 15] = 4;
                BoardAnswer16x16[3, 12] = 2;
                BoardAnswer16x16[3, 13] = 3;
                BoardAnswer16x16[3, 14] = 15;
                BoardAnswer16x16[3, 15] = 6;

                BoardAnswer16x16[4, 0] = 6;
                BoardAnswer16x16[4, 1] = 2;
                BoardAnswer16x16[4, 2] = 3;
                BoardAnswer16x16[4, 3] = 15;
                BoardAnswer16x16[5, 0] = 10;
                BoardAnswer16x16[5, 1] = 9;
                BoardAnswer16x16[5, 2] = 13;
                BoardAnswer16x16[5, 3] = 12;
                BoardAnswer16x16[6, 0] = 5;
                BoardAnswer16x16[6, 1] = 1;
                BoardAnswer16x16[6, 2] = 7;
                BoardAnswer16x16[6, 3] = 11;
                BoardAnswer16x16[7, 0] = 8;
                BoardAnswer16x16[7, 1] = 4;
                BoardAnswer16x16[7, 2] = 14;
                BoardAnswer16x16[7, 3] = 16;

                BoardAnswer16x16[4, 4] = 4;
                BoardAnswer16x16[4, 5] = 14;
                BoardAnswer16x16[4, 6] = 16;
                BoardAnswer16x16[4, 7] = 8;
                BoardAnswer16x16[5, 4] = 6;
                BoardAnswer16x16[5, 5] = 2;
                BoardAnswer16x16[5, 6] = 3;
                BoardAnswer16x16[5, 7] = 15;
                BoardAnswer16x16[6, 4] = 10;
                BoardAnswer16x16[6, 5] = 9;
                BoardAnswer16x16[6, 6] = 13;
                BoardAnswer16x16[6, 7] = 12;
                BoardAnswer16x16[7, 4] = 5;
                BoardAnswer16x16[7, 5] = 1;
                BoardAnswer16x16[7, 6] = 7;
                BoardAnswer16x16[7, 7] = 11;

                BoardAnswer16x16[4, 8] = 1;
                BoardAnswer16x16[4, 9] = 7;
                BoardAnswer16x16[4, 10] = 11;
                BoardAnswer16x16[4, 11] = 5;
                BoardAnswer16x16[5, 8] = 4;
                BoardAnswer16x16[5, 9] = 14;
                BoardAnswer16x16[5, 10] = 16;
                BoardAnswer16x16[5, 11] = 8;
                BoardAnswer16x16[6, 8] = 6;
                BoardAnswer16x16[6, 9] = 2;
                BoardAnswer16x16[6, 10] = 3;
                BoardAnswer16x16[6, 11] = 15;
                BoardAnswer16x16[7, 8] = 10;
                BoardAnswer16x16[7, 9] = 9;
                BoardAnswer16x16[7, 10] = 13;
                BoardAnswer16x16[7, 11] = 12;

                BoardAnswer16x16[4, 12] = 9;
                BoardAnswer16x16[4, 13] = 13;
                BoardAnswer16x16[4, 14] = 12;
                BoardAnswer16x16[4, 15] = 10;
                BoardAnswer16x16[5, 12] = 1;
                BoardAnswer16x16[5, 13] = 7;
                BoardAnswer16x16[5, 14] = 11;
                BoardAnswer16x16[5, 15] = 5;
                BoardAnswer16x16[6, 12] = 4;
                BoardAnswer16x16[6, 13] = 14;
                BoardAnswer16x16[6, 14] = 16;
                BoardAnswer16x16[6, 15] = 8;
                BoardAnswer16x16[7, 12] = 6;
                BoardAnswer16x16[7, 13] = 2;
                BoardAnswer16x16[7, 14] = 3;
                BoardAnswer16x16[7, 15] = 15;

                BoardAnswer16x16[8, 0] = 15;
                BoardAnswer16x16[8, 1] = 6;
                BoardAnswer16x16[8, 2] = 2;
                BoardAnswer16x16[8, 3] = 3;
                BoardAnswer16x16[9, 0] = 12;
                BoardAnswer16x16[9, 1] = 10;
                BoardAnswer16x16[9, 2] = 9;
                BoardAnswer16x16[9, 3] = 13;
                BoardAnswer16x16[10, 0] = 11;
                BoardAnswer16x16[10, 1] = 5;
                BoardAnswer16x16[10, 2] = 1;
                BoardAnswer16x16[10, 3] = 7;
                BoardAnswer16x16[11, 0] = 16;
                BoardAnswer16x16[11, 1] = 8;
                BoardAnswer16x16[11, 2] = 4;
                BoardAnswer16x16[11, 3] = 14;

                BoardAnswer16x16[8, 4] = 8;
                BoardAnswer16x16[8, 5] = 4;
                BoardAnswer16x16[8, 6] = 14;
                BoardAnswer16x16[8, 7] = 16;
                BoardAnswer16x16[9, 4] = 15;
                BoardAnswer16x16[9, 5] = 6;
                BoardAnswer16x16[9, 6] = 2;
                BoardAnswer16x16[9, 7] = 3;
                BoardAnswer16x16[10, 4] = 12;
                BoardAnswer16x16[10, 5] = 10;
                BoardAnswer16x16[10, 6] = 9;
                BoardAnswer16x16[10, 7] = 13;
                BoardAnswer16x16[11, 4] = 11;
                BoardAnswer16x16[11, 5] = 5;
                BoardAnswer16x16[11, 6] = 1;
                BoardAnswer16x16[11, 7] = 7;

                BoardAnswer16x16[8, 8] = 5;
                BoardAnswer16x16[8, 9] = 1;
                BoardAnswer16x16[8, 10] = 7;
                BoardAnswer16x16[8, 11] = 11;
                BoardAnswer16x16[9, 8] = 8;
                BoardAnswer16x16[9, 9] = 4;
                BoardAnswer16x16[9, 10] = 14;
                BoardAnswer16x16[9, 11] = 16;
                BoardAnswer16x16[10, 8] = 15;
                BoardAnswer16x16[10, 9] = 6;
                BoardAnswer16x16[10, 10] = 2;
                BoardAnswer16x16[10, 11] = 3;
                BoardAnswer16x16[11, 8] = 12;
                BoardAnswer16x16[11, 9] = 10;
                BoardAnswer16x16[11, 10] = 9;
                BoardAnswer16x16[11, 11] = 13;

                BoardAnswer16x16[8, 12] = 10;
                BoardAnswer16x16[8, 13] = 9;
                BoardAnswer16x16[8, 14] = 13;
                BoardAnswer16x16[8, 15] = 12;
                BoardAnswer16x16[9, 12] = 5;
                BoardAnswer16x16[9, 13] = 1;
                BoardAnswer16x16[9, 14] = 7;
                BoardAnswer16x16[9, 15] = 11;
                BoardAnswer16x16[10, 12] = 8;
                BoardAnswer16x16[10, 13] = 4;
                BoardAnswer16x16[10, 14] = 14;
                BoardAnswer16x16[10, 15] = 16;
                BoardAnswer16x16[11, 12] = 15;
                BoardAnswer16x16[11, 13] = 6;
                BoardAnswer16x16[11, 14] = 2;
                BoardAnswer16x16[11, 15] = 3;

                BoardAnswer16x16[12, 0] = 3;
                BoardAnswer16x16[12, 1] = 15;
                BoardAnswer16x16[12, 2] = 6;
                BoardAnswer16x16[12, 3] = 2;
                BoardAnswer16x16[13, 0] = 13;
                BoardAnswer16x16[13, 1] = 12;
                BoardAnswer16x16[13, 2] = 10;
                BoardAnswer16x16[13, 3] = 9;
                BoardAnswer16x16[14, 0] = 7;
                BoardAnswer16x16[14, 1] = 11;
                BoardAnswer16x16[14, 2] = 5;
                BoardAnswer16x16[14, 3] = 1;
                BoardAnswer16x16[15, 0] = 14;
                BoardAnswer16x16[15, 1] = 16;
                BoardAnswer16x16[15, 2] = 8;
                BoardAnswer16x16[15, 3] = 4;

                BoardAnswer16x16[12, 4] = 16;
                BoardAnswer16x16[12, 5] = 8;
                BoardAnswer16x16[12, 6] = 4;
                BoardAnswer16x16[12, 7] = 14;
                BoardAnswer16x16[13, 4] = 3;
                BoardAnswer16x16[13, 5] = 15;
                BoardAnswer16x16[13, 6] = 6;
                BoardAnswer16x16[13, 7] = 2;
                BoardAnswer16x16[14, 4] = 13;
                BoardAnswer16x16[14, 5] = 12;
                BoardAnswer16x16[14, 6] = 10;
                BoardAnswer16x16[14, 7] = 9;
                BoardAnswer16x16[15, 4] = 7;
                BoardAnswer16x16[15, 5] = 11;
                BoardAnswer16x16[15, 6] = 5;
                BoardAnswer16x16[15, 7] = 1;

                BoardAnswer16x16[12, 8] = 11;
                BoardAnswer16x16[12, 9] = 5;
                BoardAnswer16x16[12, 10] = 1;
                BoardAnswer16x16[12, 11] = 7;
                BoardAnswer16x16[13, 8] = 16;
                BoardAnswer16x16[13, 9] = 8;
                BoardAnswer16x16[13, 10] = 4;
                BoardAnswer16x16[13, 11] = 14;
                BoardAnswer16x16[14, 8] = 3;
                BoardAnswer16x16[14, 9] = 15;
                BoardAnswer16x16[14, 10] = 6;
                BoardAnswer16x16[14, 11] = 2;
                BoardAnswer16x16[15, 8] = 13;
                BoardAnswer16x16[15, 9] = 12;
                BoardAnswer16x16[15, 10] = 10;
                BoardAnswer16x16[15, 11] = 9;

                BoardAnswer16x16[12, 12] = 12;
                BoardAnswer16x16[12, 13] = 10;
                BoardAnswer16x16[12, 14] = 9;
                BoardAnswer16x16[12, 15] = 13;
                BoardAnswer16x16[13, 12] = 11;
                BoardAnswer16x16[13, 13] = 5;
                BoardAnswer16x16[13, 14] = 1;
                BoardAnswer16x16[13, 15] = 7;
                BoardAnswer16x16[14, 12] = 16;
                BoardAnswer16x16[14, 13] = 8;
                BoardAnswer16x16[14, 14] = 4;
                BoardAnswer16x16[14, 15] = 14;
                BoardAnswer16x16[15, 12] = 3;
                BoardAnswer16x16[15, 13] = 15;
                BoardAnswer16x16[15, 14] = 6;
                BoardAnswer16x16[15, 15] = 2;
                #endregion
            }
            else if (therandom == 1)
            {
                //writes over the initial board to fill in the correct spots
                #region initial
                BoardInitial16x16[0, 0] = 16;
                BoardInitial16x16[2, 0] = 14;
                BoardInitial16x16[2, 3] = 4;
                BoardInitial16x16[3, 1] = 1;
                BoardInitial16x16[3, 3] = 9;

                BoardInitial16x16[0, 6] = 9;
                BoardInitial16x16[1, 7] = 10;
                BoardInitial16x16[2, 4] = 5;
                BoardInitial16x16[2, 6] = 8;
                BoardInitial16x16[2, 7] = 6;
                BoardInitial16x16[3, 7] = 4;

                BoardInitial16x16[0, 8] = 13;
                BoardInitial16x16[2, 9] = 3;
                BoardInitial16x16[2, 10] = 7;
                BoardInitial16x16[3, 8] = 5;
                BoardInitial16x16[3, 9] = 11;
                BoardInitial16x16[3, 10] = 8;
                BoardInitial16x16[3, 11] = 6;

                BoardInitial16x16[0, 14] = 6;
                BoardInitial16x16[1, 12] = 13;
                BoardInitial16x16[2, 13] = 2;
                BoardInitial16x16[2, 14] = 9;
                BoardInitial16x16[3, 13] = 3;

                BoardInitial16x16[4, 2] = 3;
                BoardInitial16x16[4, 3] = 7;
                BoardInitial16x16[5, 2] = 11;
                BoardInitial16x16[6, 0] = 4;
                BoardInitial16x16[6, 3] = 12;
                BoardInitial16x16[7, 1] = 15;
                BoardInitial16x16[7, 2] = 1;

                BoardInitial16x16[4, 7] = 9;
                BoardInitial16x16[5, 7] = 7;
                BoardInitial16x16[6, 4] = 6;
                BoardInitial16x16[6, 7] = 8;
                BoardInitial16x16[7, 5] = 14;

                BoardInitial16x16[4, 8] = 14;
                BoardInitial16x16[4, 9] = 13;
                BoardInitial16x16[5, 10] = 2;
                BoardInitial16x16[7, 8] = 6;

                BoardInitial16x16[4, 13] = 11;
                BoardInitial16x16[4, 15] = 6;
                BoardInitial16x16[6, 13] = 1;
                BoardInitial16x16[6, 14] = 2;
                BoardInitial16x16[7, 12] = 10;

                BoardInitial16x16[8, 1] = 10;
                BoardInitial16x16[9, 1] = 6;
                BoardInitial16x16[11, 1] = 9;

                BoardInitial16x16[8, 6] = 1;
                BoardInitial16x16[9, 5] = 10;
                BoardInitial16x16[10, 6] = 5;
                BoardInitial16x16[11, 7] = 13;

                BoardInitial16x16[8, 8] = 4;
                BoardInitial16x16[8, 10] = 13;
                BoardInitial16x16[8, 11] = 12;
                BoardInitial16x16[9, 8] = 9;
                BoardInitial16x16[9, 9] = 15;
                BoardInitial16x16[9, 11] = 2;
                BoardInitial16x16[10, 8] = 7;
                BoardInitial16x16[10, 11] = 3;
                BoardInitial16x16[11, 9] = 6;
                BoardInitial16x16[11, 10] = 5;
                BoardInitial16x16[11, 11] = 11;

                BoardInitial16x16[10, 12] = 9;
                BoardInitial16x16[10, 14] = 1;
                BoardInitial16x16[10, 15] = 2;
                BoardInitial16x16[11, 12] = 7;

                BoardInitial16x16[12, 2] = 10;
                BoardInitial16x16[13, 1] = 8;
                BoardInitial16x16[13, 3] = 5;
                BoardInitial16x16[14, 0] = 13;
                BoardInitial16x16[14, 1] = 12;
                BoardInitial16x16[15, 0] = 1;
                BoardInitial16x16[15, 1] = 2;
                BoardInitial16x16[15, 2] = 9;

                BoardInitial16x16[12, 5] = 9;
                BoardInitial16x16[12, 6] = 15;
                BoardInitial16x16[13, 4] = 3;
                BoardInitial16x16[13, 7] = 16;
                BoardInitial16x16[14, 4] = 11;
                BoardInitial16x16[14, 5] = 8;

                BoardInitial16x16[12, 9] = 4;
                BoardInitial16x16[12, 10] = 14;
                BoardInitial16x16[12, 11] = 13;
                BoardInitial16x16[13, 8] = 2;
                BoardInitial16x16[14, 8] = 3;
                BoardInitial16x16[15, 9] = 8;
                BoardInitial16x16[15, 11] = 5;

                BoardInitial16x16[12, 12] = 8;
                BoardInitial16x16[12, 13] = 6;
                BoardInitial16x16[12, 14] = 5;
                BoardInitial16x16[12, 15] = 11;
                BoardInitial16x16[13, 12] = 12;
                BoardInitial16x16[13, 14] = 14;
                BoardInitial16x16[14, 13] = 9;
                BoardInitial16x16[14, 14] = 15;
                BoardInitial16x16[15, 14] = 10;
                #endregion

                //writes over the current board to fill in the correct spots
                #region initial
                BoardCurrent16x16[0, 0] = 16;
                BoardCurrent16x16[2, 0] = 14;
                BoardCurrent16x16[2, 3] = 4;
                BoardCurrent16x16[3, 1] = 1;
                BoardCurrent16x16[3, 3] = 9;

                BoardCurrent16x16[0, 6] = 9;
                BoardCurrent16x16[1, 7] = 10;
                BoardCurrent16x16[2, 4] = 5;
                BoardCurrent16x16[2, 6] = 8;
                BoardCurrent16x16[2, 7] = 6;
                BoardCurrent16x16[3, 7] = 4;

                BoardCurrent16x16[0, 8] = 13;
                BoardCurrent16x16[2, 9] = 3;
                BoardCurrent16x16[2, 10] = 7;
                BoardCurrent16x16[3, 8] = 5;
                BoardCurrent16x16[3, 9] = 11;
                BoardCurrent16x16[3, 10] = 8;
                BoardCurrent16x16[3, 11] = 6;

                BoardCurrent16x16[0, 14] = 6;
                BoardCurrent16x16[1, 12] = 13;
                BoardCurrent16x16[2, 13] = 2;
                BoardCurrent16x16[2, 14] = 9;
                BoardCurrent16x16[3, 13] = 3;

                BoardCurrent16x16[4, 2] = 3;
                BoardCurrent16x16[4, 3] = 7;
                BoardCurrent16x16[5, 2] = 11;
                BoardCurrent16x16[6, 0] = 4;
                BoardCurrent16x16[6, 3] = 12;
                BoardCurrent16x16[7, 1] = 15;
                BoardCurrent16x16[7, 2] = 1;

                BoardCurrent16x16[4, 7] = 9;
                BoardCurrent16x16[5, 7] = 7;
                BoardCurrent16x16[6, 4] = 6;
                BoardCurrent16x16[6, 7] = 8;
                BoardCurrent16x16[7, 5] = 14;

                BoardCurrent16x16[4, 8] = 14;
                BoardCurrent16x16[4, 9] = 13;
                BoardCurrent16x16[5, 10] = 2;
                BoardCurrent16x16[7, 8] = 6;

                BoardCurrent16x16[4, 13] = 11;
                BoardCurrent16x16[4, 15] = 6;
                BoardCurrent16x16[6, 13] = 1;
                BoardCurrent16x16[6, 14] = 2;
                BoardCurrent16x16[7, 12] = 10;

                BoardCurrent16x16[8, 1] = 10;
                BoardCurrent16x16[9, 1] = 6;
                BoardCurrent16x16[11, 1] = 9;

                BoardCurrent16x16[8, 6] = 1;
                BoardCurrent16x16[9, 5] = 10;
                BoardCurrent16x16[10, 6] = 5;
                BoardCurrent16x16[11, 7] = 13;

                BoardCurrent16x16[8, 8] = 4;
                BoardCurrent16x16[8, 10] = 13;
                BoardCurrent16x16[8, 11] = 12;
                BoardCurrent16x16[9, 8] = 9;
                BoardCurrent16x16[9, 9] = 15;
                BoardCurrent16x16[9, 11] = 2;
                BoardCurrent16x16[10, 8] = 7;
                BoardCurrent16x16[10, 11] = 3;
                BoardCurrent16x16[11, 9] = 6;
                BoardCurrent16x16[11, 10] = 5;
                BoardCurrent16x16[11, 11] = 11;

                BoardCurrent16x16[10, 12] = 9;
                BoardCurrent16x16[10, 14] = 1;
                BoardCurrent16x16[10, 15] = 2;
                BoardCurrent16x16[11, 12] = 7;

                BoardCurrent16x16[12, 2] = 10;
                BoardCurrent16x16[13, 1] = 8;
                BoardCurrent16x16[13, 3] = 5;
                BoardCurrent16x16[14, 0] = 13;
                BoardCurrent16x16[14, 1] = 12;
                BoardCurrent16x16[15, 0] = 1;
                BoardCurrent16x16[15, 1] = 2;
                BoardCurrent16x16[15, 2] = 9;

                BoardCurrent16x16[12, 5] = 9;
                BoardCurrent16x16[12, 6] = 15;
                BoardCurrent16x16[13, 4] = 3;
                BoardCurrent16x16[13, 7] = 16;
                BoardCurrent16x16[14, 4] = 11;
                BoardCurrent16x16[14, 5] = 8;

                BoardCurrent16x16[12, 9] = 4;
                BoardCurrent16x16[12, 10] = 14;
                BoardCurrent16x16[12, 11] = 13;
                BoardCurrent16x16[13, 8] = 2;
                BoardCurrent16x16[14, 8] = 3;
                BoardCurrent16x16[15, 9] = 8;
                BoardCurrent16x16[15, 11] = 5;

                BoardCurrent16x16[12, 12] = 8;
                BoardCurrent16x16[12, 13] = 6;
                BoardCurrent16x16[12, 14] = 5;
                BoardCurrent16x16[12, 15] = 11;
                BoardCurrent16x16[13, 12] = 12;
                BoardCurrent16x16[13, 14] = 14;
                BoardCurrent16x16[14, 13] = 9;
                BoardCurrent16x16[14, 14] = 15;
                BoardCurrent16x16[15, 14] = 10;
                #endregion

                //writes over the answer board to fill in the correct spots
                #region answerboard
                BoardAnswer16x16[0, 0] = 16;
                BoardAnswer16x16[0, 1] = 3;
                BoardAnswer16x16[0, 2] = 7;
                BoardAnswer16x16[0, 3] = 10;
                BoardAnswer16x16[1, 0] = 5;
                BoardAnswer16x16[1, 1] = 11;
                BoardAnswer16x16[1, 2] = 8;
                BoardAnswer16x16[1, 3] = 6;
                BoardAnswer16x16[2, 0] = 14;
                BoardAnswer16x16[2, 1] = 13;
                BoardAnswer16x16[2, 2] = 12;
                BoardAnswer16x16[2, 3] = 4;
                BoardAnswer16x16[3, 0] = 15;
                BoardAnswer16x16[3, 1] = 1;
                BoardAnswer16x16[3, 2] = 2;
                BoardAnswer16x16[3, 3] = 9;

                BoardAnswer16x16[0, 4] = 1;
                BoardAnswer16x16[0, 5] = 2;
                BoardAnswer16x16[0, 6] = 9;
                BoardAnswer16x16[0, 7] = 15;
                BoardAnswer16x16[1, 4] = 16;
                BoardAnswer16x16[1, 5] = 3;
                BoardAnswer16x16[1, 6] = 7;
                BoardAnswer16x16[1, 7] = 10;
                BoardAnswer16x16[2, 4] = 5;
                BoardAnswer16x16[2, 5] = 11;
                BoardAnswer16x16[2, 6] = 8;
                BoardAnswer16x16[2, 7] = 6;
                BoardAnswer16x16[3, 4] = 14;
                BoardAnswer16x16[3, 5] = 13;
                BoardAnswer16x16[3, 6] = 12;
                BoardAnswer16x16[3, 7] = 4;

                BoardAnswer16x16[0, 8] = 13;
                BoardAnswer16x16[0, 9] = 12;
                BoardAnswer16x16[0, 10] = 4;
                BoardAnswer16x16[0, 11] = 14;
                BoardAnswer16x16[1, 8] = 1;
                BoardAnswer16x16[1, 9] = 2;
                BoardAnswer16x16[1, 10] = 9;
                BoardAnswer16x16[1, 11] = 15;
                BoardAnswer16x16[2, 8] = 16;
                BoardAnswer16x16[2, 9] = 3;
                BoardAnswer16x16[2, 10] = 7;
                BoardAnswer16x16[2, 11] = 10;
                BoardAnswer16x16[3, 8] = 5;
                BoardAnswer16x16[3, 9] = 11;
                BoardAnswer16x16[3, 10] = 8;
                BoardAnswer16x16[3, 11] = 6;

                BoardAnswer16x16[0, 12] = 11;
                BoardAnswer16x16[0, 13] = 8;
                BoardAnswer16x16[0, 14] = 6;
                BoardAnswer16x16[0, 15] = 5;
                BoardAnswer16x16[1, 12] = 13;
                BoardAnswer16x16[1, 13] = 12;
                BoardAnswer16x16[1, 14] = 4;
                BoardAnswer16x16[1, 15] = 14;
                BoardAnswer16x16[2, 12] = 1;
                BoardAnswer16x16[2, 13] = 2;
                BoardAnswer16x16[2, 14] = 9;
                BoardAnswer16x16[2, 15] = 15;
                BoardAnswer16x16[3, 12] = 16;
                BoardAnswer16x16[3, 13] = 3;
                BoardAnswer16x16[3, 14] = 7;
                BoardAnswer16x16[3, 15] = 10;

                BoardAnswer16x16[4, 0] = 10;
                BoardAnswer16x16[4, 1] = 16;
                BoardAnswer16x16[4, 2] = 3;
                BoardAnswer16x16[4, 3] = 7;
                BoardAnswer16x16[5, 0] = 6;
                BoardAnswer16x16[5, 1] = 5;
                BoardAnswer16x16[5, 2] = 11;
                BoardAnswer16x16[5, 3] = 8;
                BoardAnswer16x16[6, 0] = 4;
                BoardAnswer16x16[6, 1] = 14;
                BoardAnswer16x16[6, 2] = 13;
                BoardAnswer16x16[6, 3] = 12;
                BoardAnswer16x16[7, 0] = 9;
                BoardAnswer16x16[7, 1] = 15;
                BoardAnswer16x16[7, 2] = 1;
                BoardAnswer16x16[7, 3] = 2;

                BoardAnswer16x16[4, 4] = 15;
                BoardAnswer16x16[4, 5] = 1;
                BoardAnswer16x16[4, 6] = 2;
                BoardAnswer16x16[4, 7] = 9;
                BoardAnswer16x16[5, 4] = 10;
                BoardAnswer16x16[5, 5] = 16;
                BoardAnswer16x16[5, 6] = 3;
                BoardAnswer16x16[5, 7] = 7;
                BoardAnswer16x16[6, 4] = 6;
                BoardAnswer16x16[6, 5] = 5;
                BoardAnswer16x16[6, 6] = 11;
                BoardAnswer16x16[6, 7] = 8;
                BoardAnswer16x16[7, 4] = 4;
                BoardAnswer16x16[7, 5] = 14;
                BoardAnswer16x16[7, 6] = 13;
                BoardAnswer16x16[7, 7] = 12;

                BoardAnswer16x16[4, 8] = 14;
                BoardAnswer16x16[4, 9] = 13;
                BoardAnswer16x16[4, 10] = 12;
                BoardAnswer16x16[4, 11] = 4;
                BoardAnswer16x16[5, 8] = 15;
                BoardAnswer16x16[5, 9] = 1;
                BoardAnswer16x16[5, 10] = 2;
                BoardAnswer16x16[5, 11] = 9;
                BoardAnswer16x16[6, 8] = 10;
                BoardAnswer16x16[6, 9] = 16;
                BoardAnswer16x16[6, 10] = 3;
                BoardAnswer16x16[6, 11] = 7;
                BoardAnswer16x16[7, 8] = 6;
                BoardAnswer16x16[7, 9] = 5;
                BoardAnswer16x16[7, 10] = 11;
                BoardAnswer16x16[7, 11] = 8;

                BoardAnswer16x16[4, 12] = 5;
                BoardAnswer16x16[4, 13] = 11;
                BoardAnswer16x16[4, 14] = 8;
                BoardAnswer16x16[4, 15] = 6;
                BoardAnswer16x16[5, 12] = 14;
                BoardAnswer16x16[5, 13] = 13;
                BoardAnswer16x16[5, 14] = 12;
                BoardAnswer16x16[5, 15] = 4;
                BoardAnswer16x16[6, 12] = 15;
                BoardAnswer16x16[6, 13] = 1;
                BoardAnswer16x16[6, 14] = 2;
                BoardAnswer16x16[6, 15] = 9;
                BoardAnswer16x16[7, 12] = 10;
                BoardAnswer16x16[7, 13] = 16;
                BoardAnswer16x16[7, 14] = 3;
                BoardAnswer16x16[7, 15] = 7;

                BoardAnswer16x16[8, 0] = 7;
                BoardAnswer16x16[8, 1] = 10;
                BoardAnswer16x16[8, 2] = 16;
                BoardAnswer16x16[8, 3] = 3;
                BoardAnswer16x16[9, 0] = 8;
                BoardAnswer16x16[9, 1] = 6;
                BoardAnswer16x16[9, 2] = 5;
                BoardAnswer16x16[9, 3] = 11;
                BoardAnswer16x16[10, 0] = 12;
                BoardAnswer16x16[10, 1] = 4;
                BoardAnswer16x16[10, 2] = 14;
                BoardAnswer16x16[10, 3] = 13;
                BoardAnswer16x16[11, 0] = 2;
                BoardAnswer16x16[11, 1] = 9;
                BoardAnswer16x16[11, 2] = 15;
                BoardAnswer16x16[11, 3] = 1;

                BoardAnswer16x16[8, 4] = 9;
                BoardAnswer16x16[8, 5] = 15;
                BoardAnswer16x16[8, 6] = 1;
                BoardAnswer16x16[8, 7] = 2;
                BoardAnswer16x16[9, 4] = 7;
                BoardAnswer16x16[9, 5] = 10;
                BoardAnswer16x16[9, 6] = 16;
                BoardAnswer16x16[9, 7] = 3;
                BoardAnswer16x16[10, 4] = 8;
                BoardAnswer16x16[10, 5] = 6;
                BoardAnswer16x16[10, 6] = 5;
                BoardAnswer16x16[10, 7] = 11;
                BoardAnswer16x16[11, 4] = 12;
                BoardAnswer16x16[11, 5] = 4;
                BoardAnswer16x16[11, 6] = 14;
                BoardAnswer16x16[11, 7] = 13;

                BoardAnswer16x16[8, 8] = 4;
                BoardAnswer16x16[8, 9] = 14;
                BoardAnswer16x16[8, 10] = 13;
                BoardAnswer16x16[8, 11] = 12;
                BoardAnswer16x16[9, 8] = 9;
                BoardAnswer16x16[9, 9] = 15;
                BoardAnswer16x16[9, 10] = 1;
                BoardAnswer16x16[9, 11] = 2;
                BoardAnswer16x16[10, 8] = 7;
                BoardAnswer16x16[10, 9] = 10;
                BoardAnswer16x16[10, 10] = 16;
                BoardAnswer16x16[10, 11] = 3;
                BoardAnswer16x16[11, 8] = 8;
                BoardAnswer16x16[11, 9] = 6;
                BoardAnswer16x16[11, 10] = 5;
                BoardAnswer16x16[11, 11] = 11;

                BoardAnswer16x16[8, 12] = 6;
                BoardAnswer16x16[8, 13] = 5;
                BoardAnswer16x16[8, 14] = 11;
                BoardAnswer16x16[8, 15] = 8;
                BoardAnswer16x16[9, 12] = 4;
                BoardAnswer16x16[9, 13] = 14;
                BoardAnswer16x16[9, 14] = 13;
                BoardAnswer16x16[9, 15] = 12;
                BoardAnswer16x16[10, 12] = 9;
                BoardAnswer16x16[10, 13] = 15;
                BoardAnswer16x16[10, 14] = 1;
                BoardAnswer16x16[10, 15] = 2;
                BoardAnswer16x16[11, 12] = 7;
                BoardAnswer16x16[11, 13] = 10;
                BoardAnswer16x16[11, 14] = 16;
                BoardAnswer16x16[11, 15] = 3;

                BoardAnswer16x16[12, 0] = 3;
                BoardAnswer16x16[12, 1] = 7;
                BoardAnswer16x16[12, 2] = 10;
                BoardAnswer16x16[12, 3] = 16;
                BoardAnswer16x16[13, 0] = 11;
                BoardAnswer16x16[13, 1] = 8;
                BoardAnswer16x16[13, 2] = 6;
                BoardAnswer16x16[13, 3] = 5;
                BoardAnswer16x16[14, 0] = 13;
                BoardAnswer16x16[14, 1] = 12;
                BoardAnswer16x16[14, 2] = 4;
                BoardAnswer16x16[14, 3] = 14;
                BoardAnswer16x16[15, 0] = 1;
                BoardAnswer16x16[15, 1] = 2;
                BoardAnswer16x16[15, 2] = 9;
                BoardAnswer16x16[15, 3] = 15;

                BoardAnswer16x16[12, 4] = 2;
                BoardAnswer16x16[12, 5] = 9;
                BoardAnswer16x16[12, 6] = 15;
                BoardAnswer16x16[12, 7] = 1;
                BoardAnswer16x16[13, 4] = 3;
                BoardAnswer16x16[13, 5] = 7;
                BoardAnswer16x16[13, 6] = 10;
                BoardAnswer16x16[13, 7] = 16;
                BoardAnswer16x16[14, 4] = 11;
                BoardAnswer16x16[14, 5] = 8;
                BoardAnswer16x16[14, 6] = 6;
                BoardAnswer16x16[14, 7] = 5;
                BoardAnswer16x16[15, 4] = 13;
                BoardAnswer16x16[15, 5] = 12;
                BoardAnswer16x16[15, 6] = 4;
                BoardAnswer16x16[15, 7] = 14;

                BoardAnswer16x16[12, 8] = 12;
                BoardAnswer16x16[12, 9] = 4;
                BoardAnswer16x16[12, 10] = 14;
                BoardAnswer16x16[12, 11] = 13;
                BoardAnswer16x16[13, 8] = 2;
                BoardAnswer16x16[13, 9] = 9;
                BoardAnswer16x16[13, 10] = 15;
                BoardAnswer16x16[13, 11] = 1;
                BoardAnswer16x16[14, 8] = 3;
                BoardAnswer16x16[14, 9] = 7;
                BoardAnswer16x16[14, 10] = 10;
                BoardAnswer16x16[14, 11] = 16;
                BoardAnswer16x16[15, 8] = 11;
                BoardAnswer16x16[15, 9] = 8;
                BoardAnswer16x16[15, 10] = 6;
                BoardAnswer16x16[15, 11] = 5;

                BoardAnswer16x16[12, 12] = 8;
                BoardAnswer16x16[12, 13] = 6;
                BoardAnswer16x16[12, 14] = 5;
                BoardAnswer16x16[12, 15] = 11;
                BoardAnswer16x16[13, 12] = 12;
                BoardAnswer16x16[13, 13] = 4;
                BoardAnswer16x16[13, 14] = 14;
                BoardAnswer16x16[13, 15] = 13;
                BoardAnswer16x16[14, 12] = 2;
                BoardAnswer16x16[14, 13] = 9;
                BoardAnswer16x16[14, 14] = 15;
                BoardAnswer16x16[14, 15] = 1;
                BoardAnswer16x16[15, 12] = 3;
                BoardAnswer16x16[15, 13] = 7;
                BoardAnswer16x16[15, 14] = 10;
                BoardAnswer16x16[15, 15] = 16;
                #endregion
            }
            else if (therandom == 2)
            {
                //writes over the initial board to fill in the correct spots
                #region initial
                BoardInitial16x16[0, 0] = 15;
                BoardInitial16x16[0, 1] = 13;
                BoardInitial16x16[0, 2] = 3;
                BoardInitial16x16[0, 3] = 7;
                BoardInitial16x16[2, 2] = 16;
                BoardInitial16x16[2, 3] = 11;
                BoardInitial16x16[3, 0] = 10;
                BoardInitial16x16[3, 1] = 1;
                BoardInitial16x16[3, 2] = 4;
                BoardInitial16x16[3, 3] = 6;

                BoardInitial16x16[0, 6] = 6;
                BoardInitial16x16[2, 5] = 5;
                BoardInitial16x16[3, 4] = 2;
                BoardInitial16x16[3, 7] = 11;

                BoardInitial16x16[0, 8] = 8;
                BoardInitial16x16[0, 11] = 2;
                BoardInitial16x16[2, 8] = 15;
                BoardInitial16x16[3, 8] = 14;
                BoardInitial16x16[3, 10] = 9;

                BoardInitial16x16[0, 12] = 5;
                BoardInitial16x16[0, 13] = 9;
                BoardInitial16x16[0, 14] = 12;
                BoardInitial16x16[1, 13] = 16;
                BoardInitial16x16[1, 14] = 11;
                BoardInitial16x16[1, 15] = 2;
                BoardInitial16x16[3, 12] = 15;
                BoardInitial16x16[3, 13] = 13;
                BoardInitial16x16[3, 14] = 3;
                BoardInitial16x16[3, 15] = 7;

                BoardInitial16x16[4, 0] = 7;
                BoardInitial16x16[4, 1] = 15;
                BoardInitial16x16[5, 0] = 12;
                BoardInitial16x16[5, 1] = 14;
                BoardInitial16x16[5, 2] = 5;
                BoardInitial16x16[6, 1] = 2;
                BoardInitial16x16[7, 2] = 1;
                BoardInitial16x16[7, 3] = 4;

                BoardInitial16x16[4, 6] = 4;
                BoardInitial16x16[4, 7] = 6;
                BoardInitial16x16[5, 4] = 7;
                BoardInitial16x16[5, 6] = 13;
                BoardInitial16x16[6, 4] = 12;
                BoardInitial16x16[6, 5] = 14;
                BoardInitial16x16[7, 4] = 11;
                BoardInitial16x16[7, 5] = 2;
                BoardInitial16x16[7, 7] = 16;

                BoardInitial16x16[5, 8] = 10;
                BoardInitial16x16[5, 10] = 4;
                BoardInitial16x16[6, 10] = 13;

                BoardInitial16x16[4, 13] = 5;
                BoardInitial16x16[5, 13] = 8;
                BoardInitial16x16[6, 15] = 6;
                BoardInitial16x16[7, 13] = 15;

                BoardInitial16x16[8, 2] = 15;
                BoardInitial16x16[8, 3] = 13;
                BoardInitial16x16[9, 0] = 9;
                BoardInitial16x16[9, 2] = 14;
                BoardInitial16x16[9, 3] = 5;
                BoardInitial16x16[10, 2] = 2;
                BoardInitial16x16[11, 0] = 4;
                BoardInitial16x16[11, 1] = 6;
                BoardInitial16x16[11, 2] = 10;

                BoardInitial16x16[8, 5] = 10;
                BoardInitial16x16[8, 6] = 1;
                BoardInitial16x16[9, 7] = 13;
                BoardInitial16x16[10, 7] = 5;
                BoardInitial16x16[11, 5] = 11;
                BoardInitial16x16[11, 7] = 8;

                BoardInitial16x16[8, 10] = 8;
                BoardInitial16x16[9, 9] = 10;
                BoardInitial16x16[9, 10] = 1;
                BoardInitial16x16[10, 8] = 3;
                BoardInitial16x16[11, 9] = 12;
                BoardInitial16x16[11, 11] = 5;

                BoardInitial16x16[8, 12] = 12;
                BoardInitial16x16[9, 13] = 2;
                BoardInitial16x16[9, 15] = 16;
                BoardInitial16x16[10, 12] = 6;
                BoardInitial16x16[10, 13] = 10;
                BoardInitial16x16[10, 14] = 1;
                BoardInitial16x16[10, 15] = 4;
                BoardInitial16x16[11, 12] = 3;
                BoardInitial16x16[11, 13] = 7;
                BoardInitial16x16[11, 14] = 15;

                BoardInitial16x16[12, 0] = 13;
                BoardInitial16x16[12, 1] = 3;
                BoardInitial16x16[13, 1] = 9;
                BoardInitial16x16[14, 2] = 11;
                BoardInitial16x16[14, 3] = 2;
                BoardInitial16x16[15, 0] = 1;
                BoardInitial16x16[15, 1] = 4;

                BoardInitial16x16[12, 4] = 4;
                BoardInitial16x16[12, 5] = 6;
                BoardInitial16x16[12, 7] = 1;
                BoardInitial16x16[13, 4] = 13;
                BoardInitial16x16[13, 6] = 7;
                BoardInitial16x16[14, 5] = 9;
                BoardInitial16x16[14, 7] = 14;
                BoardInitial16x16[15, 5] = 16;

                BoardInitial16x16[12, 8] = 16;
                BoardInitial16x16[13, 9] = 6;

                BoardInitial16x16[12, 12] = 9;
                BoardInitial16x16[12, 13] = 12;
                BoardInitial16x16[13, 12] = 16;
                BoardInitial16x16[14, 12] = 4;
                BoardInitial16x16[15, 14] = 7;
                BoardInitial16x16[15, 15] = 15;
                #endregion

                //writes over the current board to fill in the correct spots
                #region current
                BoardCurrent16x16[0, 0] = 15;
                BoardCurrent16x16[0, 1] = 13;
                BoardCurrent16x16[0, 2] = 3;
                BoardCurrent16x16[0, 3] = 7;
                BoardCurrent16x16[2, 2] = 16;
                BoardCurrent16x16[2, 3] = 11;
                BoardCurrent16x16[3, 0] = 10;
                BoardCurrent16x16[3, 1] = 1;
                BoardCurrent16x16[3, 2] = 4;
                BoardCurrent16x16[3, 3] = 6;

                BoardCurrent16x16[0, 6] = 6;
                BoardCurrent16x16[2, 5] = 5;
                BoardCurrent16x16[3, 4] = 2;
                BoardCurrent16x16[3, 7] = 11;

                BoardCurrent16x16[0, 8] = 8;
                BoardCurrent16x16[0, 11] = 2;
                BoardCurrent16x16[2, 8] = 15;
                BoardCurrent16x16[3, 8] = 14;
                BoardCurrent16x16[3, 10] = 9;

                BoardCurrent16x16[0, 12] = 5;
                BoardCurrent16x16[0, 13] = 9;
                BoardCurrent16x16[0, 14] = 12;
                BoardCurrent16x16[1, 13] = 16;
                BoardCurrent16x16[1, 14] = 11;
                BoardCurrent16x16[1, 15] = 2;
                BoardCurrent16x16[3, 12] = 15;
                BoardCurrent16x16[3, 13] = 13;
                BoardCurrent16x16[3, 14] = 3;
                BoardCurrent16x16[3, 15] = 7;

                BoardCurrent16x16[4, 0] = 7;
                BoardCurrent16x16[4, 1] = 15;
                BoardCurrent16x16[5, 0] = 12;
                BoardCurrent16x16[5, 1] = 14;
                BoardCurrent16x16[5, 2] = 5;
                BoardCurrent16x16[6, 1] = 2;
                BoardCurrent16x16[7, 2] = 1;
                BoardCurrent16x16[7, 3] = 4;

                BoardCurrent16x16[4, 6] = 4;
                BoardCurrent16x16[4, 7] = 6;
                BoardCurrent16x16[5, 4] = 7;
                BoardCurrent16x16[5, 6] = 13;
                BoardCurrent16x16[6, 4] = 12;
                BoardCurrent16x16[6, 5] = 14;
                BoardCurrent16x16[7, 4] = 11;
                BoardCurrent16x16[7, 5] = 2;
                BoardCurrent16x16[7, 7] = 16;

                BoardCurrent16x16[5, 8] = 10;
                BoardCurrent16x16[5, 10] = 4;
                BoardCurrent16x16[6, 10] = 13;

                BoardCurrent16x16[4, 13] = 5;
                BoardCurrent16x16[5, 13] = 8;
                BoardCurrent16x16[6, 15] = 6;
                BoardCurrent16x16[7, 13] = 15;

                BoardCurrent16x16[8, 2] = 15;
                BoardCurrent16x16[8, 3] = 13;
                BoardCurrent16x16[9, 0] = 9;
                BoardCurrent16x16[9, 2] = 14;
                BoardCurrent16x16[9, 3] = 5;
                BoardCurrent16x16[10, 2] = 2;
                BoardCurrent16x16[11, 0] = 4;
                BoardCurrent16x16[11, 1] = 6;
                BoardCurrent16x16[11, 2] = 10;

                BoardCurrent16x16[8, 5] = 10;
                BoardCurrent16x16[8, 6] = 1;
                BoardCurrent16x16[9, 7] = 13;
                BoardCurrent16x16[10, 7] = 5;
                BoardCurrent16x16[11, 5] = 11;
                BoardCurrent16x16[11, 7] = 8;

                BoardCurrent16x16[8, 10] = 8;
                BoardCurrent16x16[9, 9] = 10;
                BoardCurrent16x16[9, 10] = 1;
                BoardCurrent16x16[10, 8] = 3;
                BoardCurrent16x16[11, 9] = 12;
                BoardCurrent16x16[11, 11] = 5;

                BoardCurrent16x16[8, 12] = 12;
                BoardCurrent16x16[9, 13] = 2;
                BoardCurrent16x16[9, 15] = 16;
                BoardCurrent16x16[10, 12] = 6;
                BoardCurrent16x16[10, 13] = 10;
                BoardCurrent16x16[10, 14] = 1;
                BoardCurrent16x16[10, 15] = 4;
                BoardCurrent16x16[11, 12] = 3;
                BoardCurrent16x16[11, 13] = 7;
                BoardCurrent16x16[11, 14] = 15;

                BoardCurrent16x16[12, 0] = 13;
                BoardCurrent16x16[12, 1] = 3;
                BoardCurrent16x16[13, 1] = 9;
                BoardCurrent16x16[14, 2] = 11;
                BoardCurrent16x16[14, 3] = 2;
                BoardCurrent16x16[15, 0] = 1;
                BoardCurrent16x16[15, 1] = 4;

                BoardCurrent16x16[12, 4] = 4;
                BoardCurrent16x16[12, 5] = 6;
                BoardCurrent16x16[12, 7] = 1;
                BoardCurrent16x16[13, 4] = 13;
                BoardCurrent16x16[13, 6] = 7;
                BoardCurrent16x16[14, 5] = 9;
                BoardCurrent16x16[14, 7] = 14;
                BoardCurrent16x16[15, 5] = 16;

                BoardCurrent16x16[12, 8] = 16;
                BoardCurrent16x16[13, 9] = 6;

                BoardCurrent16x16[12, 12] = 9;
                BoardCurrent16x16[12, 13] = 12;
                BoardCurrent16x16[13, 12] = 16;
                BoardCurrent16x16[14, 12] = 4;
                BoardCurrent16x16[15, 14] = 7;
                BoardCurrent16x16[15, 15] = 15;
                #endregion

                //writes over the answer board to fill in the correct spots
                #region answerboard
                BoardAnswer16x16[0, 0] = 15;
                BoardAnswer16x16[0, 1] = 13;
                BoardAnswer16x16[0, 2] = 3;
                BoardAnswer16x16[0, 3] = 7;
                BoardAnswer16x16[1, 0] = 14;
                BoardAnswer16x16[1, 1] = 5;
                BoardAnswer16x16[1, 2] = 9;
                BoardAnswer16x16[1, 3] = 12;
                BoardAnswer16x16[2, 0] = 2;
                BoardAnswer16x16[2, 1] = 8;
                BoardAnswer16x16[2, 2] = 16;
                BoardAnswer16x16[2, 3] = 11;
                BoardAnswer16x16[3, 0] = 10;
                BoardAnswer16x16[3, 1] = 1;
                BoardAnswer16x16[3, 2] = 4;
                BoardAnswer16x16[3, 3] = 6;

                BoardAnswer16x16[0, 4] = 1;
                BoardAnswer16x16[0, 5] = 4;
                BoardAnswer16x16[0, 6] = 6;
                BoardAnswer16x16[0, 7] = 10;
                BoardAnswer16x16[1, 4] = 15;
                BoardAnswer16x16[1, 5] = 13;
                BoardAnswer16x16[1, 6] = 3;
                BoardAnswer16x16[1, 7] = 7;
                BoardAnswer16x16[2, 4] = 14;
                BoardAnswer16x16[2, 5] = 5;
                BoardAnswer16x16[2, 6] = 9;
                BoardAnswer16x16[2, 7] = 12;
                BoardAnswer16x16[3, 4] = 2;
                BoardAnswer16x16[3, 5] = 8;
                BoardAnswer16x16[3, 6] = 16;
                BoardAnswer16x16[3, 7] = 11;

                BoardAnswer16x16[0, 8] = 8;
                BoardAnswer16x16[0, 9] = 16;
                BoardAnswer16x16[0, 10] = 11;
                BoardAnswer16x16[0, 11] = 2;
                BoardAnswer16x16[1, 8] = 1;
                BoardAnswer16x16[1, 9] = 4;
                BoardAnswer16x16[1, 10] = 6;
                BoardAnswer16x16[1, 11] = 10;
                BoardAnswer16x16[2, 8] = 15;
                BoardAnswer16x16[2, 9] = 13;
                BoardAnswer16x16[2, 10] = 3;
                BoardAnswer16x16[2, 11] = 7;
                BoardAnswer16x16[3, 8] = 14;
                BoardAnswer16x16[3, 9] = 5;
                BoardAnswer16x16[3, 10] = 9;
                BoardAnswer16x16[3, 11] = 12;

                BoardAnswer16x16[0, 12] = 5;
                BoardAnswer16x16[0, 13] = 9;
                BoardAnswer16x16[0, 14] = 12;
                BoardAnswer16x16[0, 15] = 14;
                BoardAnswer16x16[1, 12] = 8;
                BoardAnswer16x16[1, 13] = 16;
                BoardAnswer16x16[1, 14] = 11;
                BoardAnswer16x16[1, 15] = 2;
                BoardAnswer16x16[2, 12] = 1;
                BoardAnswer16x16[2, 13] = 4;
                BoardAnswer16x16[2, 14] = 6;
                BoardAnswer16x16[2, 15] = 10;
                BoardAnswer16x16[3, 12] = 15;
                BoardAnswer16x16[3, 13] = 13;
                BoardAnswer16x16[3, 14] = 3;
                BoardAnswer16x16[3, 15] = 7;

                BoardAnswer16x16[4, 0] = 7;
                BoardAnswer16x16[4, 1] = 15;
                BoardAnswer16x16[4, 2] = 13;
                BoardAnswer16x16[4, 3] = 3;
                BoardAnswer16x16[5, 0] = 12;
                BoardAnswer16x16[5, 1] = 14;
                BoardAnswer16x16[5, 2] = 5;
                BoardAnswer16x16[5, 3] = 9;
                BoardAnswer16x16[6, 0] = 11;
                BoardAnswer16x16[6, 1] = 2;
                BoardAnswer16x16[6, 2] = 8;
                BoardAnswer16x16[6, 3] = 16;
                BoardAnswer16x16[7, 0] = 6;
                BoardAnswer16x16[7, 1] = 10;
                BoardAnswer16x16[7, 2] = 1;
                BoardAnswer16x16[7, 3] = 4;

                BoardAnswer16x16[4, 4] = 10;
                BoardAnswer16x16[4, 5] = 1;
                BoardAnswer16x16[4, 6] = 4;
                BoardAnswer16x16[4, 7] = 6;
                BoardAnswer16x16[5, 4] = 7;
                BoardAnswer16x16[5, 5] = 15;
                BoardAnswer16x16[5, 6] = 13;
                BoardAnswer16x16[5, 7] = 3;
                BoardAnswer16x16[6, 4] = 12;
                BoardAnswer16x16[6, 5] = 14;
                BoardAnswer16x16[6, 6] = 5;
                BoardAnswer16x16[6, 7] = 9;
                BoardAnswer16x16[7, 4] = 11;
                BoardAnswer16x16[7, 5] = 2;
                BoardAnswer16x16[7, 6] = 8;
                BoardAnswer16x16[7, 7] = 16;

                BoardAnswer16x16[4, 8] = 2;
                BoardAnswer16x16[4, 9] = 8;
                BoardAnswer16x16[4, 10] = 16;
                BoardAnswer16x16[4, 11] = 11;
                BoardAnswer16x16[5, 8] = 10;
                BoardAnswer16x16[5, 9] = 1;
                BoardAnswer16x16[5, 10] = 4;
                BoardAnswer16x16[5, 11] = 6;
                BoardAnswer16x16[6, 8] = 7;
                BoardAnswer16x16[6, 9] = 15;
                BoardAnswer16x16[6, 10] = 13;
                BoardAnswer16x16[6, 11] = 3;
                BoardAnswer16x16[7, 8] = 12;
                BoardAnswer16x16[7, 9] = 14;
                BoardAnswer16x16[7, 10] = 5;
                BoardAnswer16x16[7, 11] = 9;

                BoardAnswer16x16[4, 12] = 14;
                BoardAnswer16x16[4, 13] = 5;
                BoardAnswer16x16[4, 14] = 9;
                BoardAnswer16x16[4, 15] = 12;
                BoardAnswer16x16[5, 12] = 2;
                BoardAnswer16x16[5, 13] = 8;
                BoardAnswer16x16[5, 14] = 16;
                BoardAnswer16x16[5, 15] = 11;
                BoardAnswer16x16[6, 12] = 10;
                BoardAnswer16x16[6, 13] = 1;
                BoardAnswer16x16[6, 14] = 4;
                BoardAnswer16x16[6, 15] = 6;
                BoardAnswer16x16[7, 12] = 7;
                BoardAnswer16x16[7, 13] = 15;
                BoardAnswer16x16[7, 14] = 13;
                BoardAnswer16x16[7, 15] = 3;

                BoardAnswer16x16[8, 0] = 3;
                BoardAnswer16x16[8, 1] = 7;
                BoardAnswer16x16[8, 2] = 15;
                BoardAnswer16x16[8, 3] = 13;
                BoardAnswer16x16[9, 0] = 9;
                BoardAnswer16x16[9, 1] = 12;
                BoardAnswer16x16[9, 2] = 14;
                BoardAnswer16x16[9, 3] = 5;
                BoardAnswer16x16[10, 0] = 16;
                BoardAnswer16x16[10, 1] = 11;
                BoardAnswer16x16[10, 2] = 2;
                BoardAnswer16x16[10, 3] = 8;
                BoardAnswer16x16[11, 0] = 4;
                BoardAnswer16x16[11, 1] = 6;
                BoardAnswer16x16[11, 2] = 10;
                BoardAnswer16x16[11, 3] = 1;

                BoardAnswer16x16[8, 4] = 6;
                BoardAnswer16x16[8, 5] = 10;
                BoardAnswer16x16[8, 6] = 1;
                BoardAnswer16x16[8, 7] = 4;
                BoardAnswer16x16[9, 4] = 3;
                BoardAnswer16x16[9, 5] = 7;
                BoardAnswer16x16[9, 6] = 15;
                BoardAnswer16x16[9, 7] = 13;
                BoardAnswer16x16[10, 4] = 9;
                BoardAnswer16x16[10, 5] = 12;
                BoardAnswer16x16[10, 6] = 14;
                BoardAnswer16x16[10, 7] = 5;
                BoardAnswer16x16[11, 4] = 16;
                BoardAnswer16x16[11, 5] = 11;
                BoardAnswer16x16[11, 6] = 2;
                BoardAnswer16x16[11, 7] = 8;

                BoardAnswer16x16[8, 8] = 11;
                BoardAnswer16x16[8, 9] = 2;
                BoardAnswer16x16[8, 10] = 8;
                BoardAnswer16x16[8, 11] = 16;
                BoardAnswer16x16[9, 8] = 6;
                BoardAnswer16x16[9, 9] = 10;
                BoardAnswer16x16[9, 10] = 1;
                BoardAnswer16x16[9, 11] = 4;
                BoardAnswer16x16[10, 8] = 3;
                BoardAnswer16x16[10, 9] = 7;
                BoardAnswer16x16[10, 10] = 15;
                BoardAnswer16x16[10, 11] = 13;
                BoardAnswer16x16[11, 8] = 9;
                BoardAnswer16x16[11, 9] = 12;
                BoardAnswer16x16[11, 10] = 14;
                BoardAnswer16x16[11, 11] = 5;

                BoardAnswer16x16[8, 12] = 12;
                BoardAnswer16x16[8, 13] = 14;
                BoardAnswer16x16[8, 14] = 5;
                BoardAnswer16x16[8, 15] = 9;
                BoardAnswer16x16[9, 12] = 11;
                BoardAnswer16x16[9, 13] = 2;
                BoardAnswer16x16[9, 14] = 8;
                BoardAnswer16x16[9, 15] = 16;
                BoardAnswer16x16[10, 12] = 6;
                BoardAnswer16x16[10, 13] = 10;
                BoardAnswer16x16[10, 14] = 1;
                BoardAnswer16x16[10, 15] = 4;
                BoardAnswer16x16[11, 12] = 3;
                BoardAnswer16x16[11, 13] = 7;
                BoardAnswer16x16[11, 14] = 15;
                BoardAnswer16x16[11, 15] = 13;

                BoardAnswer16x16[12, 0] = 13;
                BoardAnswer16x16[12, 1] = 3;
                BoardAnswer16x16[12, 2] = 7;
                BoardAnswer16x16[12, 3] = 15;
                BoardAnswer16x16[13, 0] = 5;
                BoardAnswer16x16[13, 1] = 9;
                BoardAnswer16x16[13, 2] = 12;
                BoardAnswer16x16[13, 3] = 14;
                BoardAnswer16x16[14, 0] = 8;
                BoardAnswer16x16[14, 1] = 16;
                BoardAnswer16x16[14, 2] = 11;
                BoardAnswer16x16[14, 3] = 2;
                BoardAnswer16x16[15, 0] = 1;
                BoardAnswer16x16[15, 1] = 4;
                BoardAnswer16x16[15, 2] = 6;
                BoardAnswer16x16[15, 3] = 10;

                BoardAnswer16x16[12, 4] = 4;
                BoardAnswer16x16[12, 5] = 6;
                BoardAnswer16x16[12, 6] = 10;
                BoardAnswer16x16[12, 7] = 1;
                BoardAnswer16x16[13, 4] = 13;
                BoardAnswer16x16[13, 5] = 3;
                BoardAnswer16x16[13, 6] = 7;
                BoardAnswer16x16[13, 7] = 15;
                BoardAnswer16x16[14, 4] = 5;
                BoardAnswer16x16[14, 5] = 9;
                BoardAnswer16x16[14, 6] = 12;
                BoardAnswer16x16[14, 7] = 14;
                BoardAnswer16x16[15, 4] = 8;
                BoardAnswer16x16[15, 5] = 16;
                BoardAnswer16x16[15, 6] = 11;
                BoardAnswer16x16[15, 7] = 2;

                BoardAnswer16x16[12, 8] = 16;
                BoardAnswer16x16[12, 9] = 11;
                BoardAnswer16x16[12, 10] = 2;
                BoardAnswer16x16[12, 11] = 8;
                BoardAnswer16x16[13, 8] = 4;
                BoardAnswer16x16[13, 9] = 6;
                BoardAnswer16x16[13, 10] = 10;
                BoardAnswer16x16[13, 11] = 1;
                BoardAnswer16x16[14, 8] = 13;
                BoardAnswer16x16[14, 9] = 3;
                BoardAnswer16x16[14, 10] = 7;
                BoardAnswer16x16[14, 11] = 15;
                BoardAnswer16x16[15, 8] = 5;
                BoardAnswer16x16[15, 9] = 9;
                BoardAnswer16x16[15, 10] = 12;
                BoardAnswer16x16[15, 11] = 14;

                BoardAnswer16x16[12, 12] = 9;
                BoardAnswer16x16[12, 13] = 12;
                BoardAnswer16x16[12, 14] = 14;
                BoardAnswer16x16[12, 15] = 5;
                BoardAnswer16x16[13, 12] = 16;
                BoardAnswer16x16[13, 13] = 11;
                BoardAnswer16x16[13, 14] = 2;
                BoardAnswer16x16[13, 15] = 8;
                BoardAnswer16x16[14, 12] = 4;
                BoardAnswer16x16[14, 13] = 6;
                BoardAnswer16x16[14, 14] = 10;
                BoardAnswer16x16[14, 15] = 1;
                BoardAnswer16x16[15, 12] = 13;
                BoardAnswer16x16[15, 13] = 3;
                BoardAnswer16x16[15, 14] = 7;
                BoardAnswer16x16[15, 15] = 15;
                #endregion

            }
        }
    }
}
